different aggregation on different columns

join shbcf.ru